package com.archaeanx.lib;

import android.app.Application;
import android.os.Handler;
import android.util.Log;

import com.archeanx.lib.http.XHttpHelper;
import com.archeanx.lib.http.XOnHttpRequestInitListener;



public class App extends Application {
    public static volatile Handler sAppHandler;

    static {
//        XHttpHelper.getInstance().initHttpRequest(new XOnHttpRequestInitListener() {
//            @Override
//            public Retrofit getRetrofit(String baseUrl) {
//                return super.getRetrofit(baseUrl);
//            }
//
//            @Override
//            public OkHttpClient getOkHttp() {
//                return super.getOkHttp();
//            }
//
//            @Override
//            public OkHttpClient.Builder getOkhttpBuilder() {
//                OkHttpClient.Builder okhttpBuilder = super.getOkhttpBuilder();
//                okhttpBuilder.addNetworkInterceptor(new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger() {
//                    @Override
//                    public void log(String message) {
//                        Log.d("---Http-headddddd--", message);
//                    }
//                }).setLevel(HttpLoggingInterceptor.Level.HEADERS));
//
//                return okhttpBuilder;
//            }
//        });
    }

    @Override
    public void onCreate() {
        super.onCreate();
        sAppHandler = new Handler(getApplicationContext().getMainLooper());
    }
}
